package com.bulletflash {
	import cmodule.BulletPhysics.*;

	import flash.utils.ByteArray;

	public class btBase {
		protected static var loader : CLibInit;
		protected static var bullet : Object;
		protected static var memUser:MemUser;
		protected static var alchemyMemory : ByteArray;
		
		private static var initialized : Boolean = false;

		public static function initialize() : void {
			if (initialized) {
				return;
			}
			initialized = true;

			loader = new CLibInit();
			bullet = loader.init();
			
			memUser = new MemUser();
			
			var ns : Namespace = new Namespace("cmodule.BulletPhysics");
			alchemyMemory = (ns::gstate).ds;
		}
		
		public var pointer:uint;
		
		//0.01 meter per pixel by default
		//refer to http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Scaling_The_World
		protected var _scaling:Number = 100;
	}
}